<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<hr/>
<script>
    document.write("d">"c");
    document.write("<hr>");
    function add() {
        var sum=0;
        for (var i=0;i<arguments.length;i++){
            sum+=arguments[i];
        }
        return sum;
    }
    //调用
    var sum=add(1,2,3,4,5);
    alert(sum);

</script>
</body>
</html>